All Questions
11 questions
0votes
1answer
138views
Microservice in Springboot
I wrote two microservices in Springboot and tried to follow the best practices. I would appreciate any suggestions about any improvement that I can make on the whole codebase. What are the parts of ...
2votes
2answers
123views
Designing object oriented clean code structure with spring services
I'm writing spring app for storing and manipulating recipes. I wrote ShoppingList service which generates, based on UUIDs of recipes, shopping list. This is my current model for which i wrote tests ...
2votes
2answers
680views
Loan application service based on user credit score
The following microservice is just handling loan application and response the result of the application is accepted or rejected. It is part of my assignment for an interview. The project description ...
1vote
1answer
60views
Repository and service improvements
I have a MongoRepository: ...
2votes
2answers
322views
Spring service for playing Rock Paper Scissors
I had created a service which does the actual play of Rock Paper Scissors. Below is the service which takes a PlayRequest and updates the State of Player objects given by the PlayerService. So the ...
2votes
0answers
74views
Initiate, propagate, validate, send, and marshal a message in Spring
Purpose of code The goal of this code is to: Initiate a message propagation to other systems Validate that the given message adheres to its XSD schema, and then marshall it Send it on a Camel route ...
5votes
1answer
4kviews
Custom ResponseModel for Spring Controller - ResponseEntity<?>
I created a custom responseModel to have a standard json responseModel for some of my different RestController. Superclass TransactionResponseModel: ...
0votes
1answer
150views
Refactoring service class which communicates with external API
Below is the class definition which I created as a POC for some project, at present the class does too much thing and I don't know how to what would be a good design i.e. which object to use as DI etc....
1vote
1answer
335views
Class Design : Parsers for different file type and ParserFactory
I have come up with a class design for parsers (for xml,csv etc) and parser factory. I will be using it in my project.I will be configuring these as beans in the spring context file. I would like to ...
3votes
2answers
5kviews
DAOs for Person, Employee, Staff, etc
I have an abstract PersonDao class, extended by several other DAO classes, for example EmployeeDao, ...
6votes
1answer
480views
Circular dependencies between immutable objects; the Freeze Pattern
Generally, I structure small threadsafe immutable objects like this: ...